diff options
| author | real-zephex <[email protected]> | 2024-03-17 07:08:55 +0530 |
|---|---|---|
| committer | real-zephex <[email protected]> | 2024-03-17 07:08:55 +0530 |
| commit | bc2963f9e76a4000e3f1747b6fa4affdebba3956 (patch) | |
| tree | 39fa19bbe792b3b90b526ef5460545c76bca3dcf /src/app/info/[id] | |
| parent | minor fixes and feature improvements: added an indicator which shows when the... (diff) | |
| download | dramalama-bc2963f9e76a4000e3f1747b6fa4affdebba3956.tar.xz dramalama-bc2963f9e76a4000e3f1747b6fa4affdebba3956.zip | |
prettified the code :)
Diffstat (limited to 'src/app/info/[id]')
| -rw-r--r-- | src/app/info/[id]/page.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/app/info/[id]/page.js b/src/app/info/[id]/page.js index 9d37819..e49443f 100644 --- a/src/app/info/[id]/page.js +++ b/src/app/info/[id]/page.js @@ -1,8 +1,8 @@ -import "../info.css" +import "../info.css"; import Image from "next/image"; import CreateButton from "../buttons"; -export default async function AnimeInfo({params}) { +export default async function AnimeInfo({ params }) { let animeID = params.id; const info = await getAnimeInfo(animeID); @@ -14,32 +14,32 @@ export default async function AnimeInfo({params}) { <div> <div className="titleContainer"> <p>{info.title}</p> - <Image + <Image src={info.image} width={140} height={190} alt="Drama" /> </div> - <p className="dramaDescription"> - {info.description} - </p> + <p className="dramaDescription">{info.description}</p> </div> )} <div className="buttonContainer"> - {info && info.episodes.map((item, index) => ( - <CreateButton key={index} a={item} /> - ))} + {info && + info.episodes.map((item, index) => ( + <CreateButton key={index} a={item} /> + ))} </div> - </div> </div> - ) + ); } async function getAnimeInfo(anime_id) { - const res = await fetch("https://anime-sensei-api.vercel.app/anime/gogoanime/info/" + anime_id); + const res = await fetch( + "https://anime-sensei-api.vercel.app/anime/gogoanime/info/" + anime_id + ); const data = res.json(); return data; -}
\ No newline at end of file +} |